package com.yugao.fintech.antelope.mps.api;

import com.alibaba.cloud.nacos.NacosServiceAutoConfiguration;
import com.yugao.fintech.antelope.base.model.constants.SecurityCons;
import com.yugao.fintech.antelope.base.model.constants.ServiceCodeCons;
import com.yugao.fintech.antelope.mps.api.model.rqrs.CheckAuthUserCaptchaReq;
import com.yugao.fintech.antelope.mps.api.model.rqrs.CheckNoAuthUserCaptchaReq;
import com.yugao.fintech.antelope.mps.api.model.rqrs.MsgPushParam;
import com.yugao.fintech.antelope.mps.api.model.rqrs.SendCaptchaMsgReq;
import com.yugao.fintech.framework.core.response.Resp;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "msgPushFeignApi", value = ServiceCodeCons.MSG_PUSH_SERVICE)
@ConditionalOnClass({FeignAutoConfiguration.class, NacosServiceAutoConfiguration.class})
public interface MsgPushFeignApi {
    /**
     * 远程推送服务
     *
     * @param msgPush 推送的消息
     * @return 结果
     */
    @PostMapping(value = "/msgPush/", headers = SecurityCons.HEADER_FROM_IN)
    Resp<?> push(@RequestBody MsgPushParam msgPush);

    @PostMapping(value = "/captchaMsg/check", headers = SecurityCons.HEADER_FROM_IN)
    Resp<?> checkNoAuthUserCaptcha(@RequestBody CheckNoAuthUserCaptchaReq req);

    @PostMapping(value = "/authUserCaptchaMsg/check", headers = SecurityCons.HEADER_FROM_IN)
    Resp<?> checkAuthUserCaptcha(@RequestBody CheckAuthUserCaptchaReq rq);

    @PostMapping(value = "/captchaMsg/send", headers = SecurityCons.HEADER_FROM_IN)
    Resp<?> sendNoAuthUserCaptcha(@RequestBody SendCaptchaMsgReq req);
}
